package actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

/**
 * An action for a Staff Member that will take them to a screen of 
 * all the current volunteers in the system. They will then be able to 
 * choose any of these volunteers to blackball. 
 * 
 * @author Natalie
 *
 */
@SuppressWarnings("serial")
public class BlackballVolunteerAction extends AbstractAction {

	private final Frame myFrame;
	
	public BlackballVolunteerAction(final Frame theFrame) {
		super("Blackball A Volunteer");
		myFrame = theFrame;
	}
	
	/**
	 * Sets the previous action to point to the previous screen, and displays a 
	 * list of all volunteers in the system. 
	 */
	@Override
	public void actionPerformed(final ActionEvent theEvent) {
		myFrame.setPreviousAction(new HomeAction(myFrame));
		myFrame.displayVolunteers();
	}

}
